package com.blue.jdbc.model;

import java.util.Date;

import com.blue.jdbc.annotation.Id;
import com.blue.jdbc.annotation.Table;
import com.blue.jdbc.annotation.Version;

@Table
public class Goods
{
	@Id
	private Integer id;
	@Version
	private Integer version;
	private String name;
	private Integer number;
	private Date instockTime;
	private Double price;
	private Integer buys;

	public Goods()
	{
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Integer getVersion()
	{
		return version;
	}

	public void setVersion(Integer version)
	{
		this.version = version;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public Integer getNumber()
	{
		return number;
	}

	public void setNumber(Integer number)
	{
		this.number = number;
	}

	public Date getInstockTime()
	{
		return instockTime;
	}

	public void setInstockTime(Date instockTime)
	{
		this.instockTime = instockTime;
	}

	public Double getPrice()
	{
		return price;
	}

	public void setPrice(Double price)
	{
		this.price = price;
	}

	public Integer getBuys()
	{
		return buys;
	}

	public void setBuys(Integer buys)
	{
		this.buys = buys;
	}

	@Override
	public String toString()
	{
		return String.format("id: %d, name: %s, number: %d, instockTime: %s, price: %s",
				id, name, number, instockTime, price);
	}

}
